export default {
    state: {
      userId: null,
      userRole: null,
      departmentId: null
    },
    mutations: {
      SET_USER_INFO(state, payload) {
        state.userId = payload.employeeId
        state.userRole = payload.role
        state.departmentId = payload.departmentId
      }
    },
    getters: {
      userId: state => state.userId,
      userRole: state => state.userRole,
      departmentId: state => state.departmentId,
      currentUser: state => ({
        userId: state.userId,
        userRole: state.userRole,
        departmentId: state.departmentId
      })
    }
  }